import scrapy


class BaseItem(scrapy.Item):
    origin_url = scrapy.Field()  # 原始地址
    html = scrapy.Field()  # 公告html源码
    create_time = scrapy.Field()  # 创建时间
    update_time = scrapy.Field()  # 跟新时间
    announcement_title = scrapy.Field()  # 公告标题
    announcement_type = scrapy.Field()  # 公告类型
    release_time = scrapy.Field()  # 公告发布时间
    is_parsed = scrapy.Field()  # 是否已经提取过信息
    source_type = scrapy.Field()  # 属于哪个网站的信息
    province = scrapy.Field()  # 所属省份
    city = scrapy.Field()  # 网站所属城市
    project_city = scrapy.Field()  # 工程所属城市
    project_area = scrapy.Field()  # 工程所属地区
    project_type = scrapy.Field()  # 工程类型 ，比如：勘测设计，园林设计，工程监理，房屋建筑施工等
    file_type = scrapy.Field()  # 文件类型 备选字段： pdf  / zip  / doc  / jpg
    file_content = scrapy.Field()  # 文件内容


convert_dict = {
    "release_time": "公告发布时间",
    "announcement_title": "公告标题",
    'announcement_type': "公告类型",
    'construction_type': "公告类型",
    'project_type': "工程类型",
    'info_type': '工程类型',
    'project_area': "工程所属地区",
    'first_url': "跳转前网页",
    "project_city": "工程所属城市",
    "bidder_name": "招标人信息名称",
    "project_num": "项目编号",
}
